<template>
	<view style="padding-bottom: 30rpx; height: 100vh; overflow-y: auto;">
		<view class="active" :style="{backgroundImage: 'url('+imageURL+')'}">
			<text>{{now_time}}</text>
			<text class="paihang">阅读排行</text>
		</view>
		<view class="centent" v-for="(item,index) in school_list" :key="index">
			<view class="one">
				<image v-if="index==0" src="../static/1.png" mode=""></image>
				<image v-if="index==1" src="../static/2.png" mode=""></image>
				<image v-if="index==2" src="../static/3.png" mode=""></image>
				<text v-if="index>2">{{index+1}}</text>
			</view>
			<!-- <view class="two">
				<image src="../static/xh.png" mode=""></image>
			</view> -->
			<view class="three">
				<text>{{item.school_name}}</text>
				<view class="fubudianzan">
					<text>点赞{{item.classring_tags}}</text>
					<text>发布{{item.classring_nums}}</text>
					<text>评论{{item.classring_reviews}}</text>
				</view>
			</view>
		</view>









	</view>
</template>

<script>
	export default {
		data() {
			return {
				company_id: 0,
				school_list: [],
				now_time: '',
				imageURL: ''
			}
		},
		methods: {
			jiaoyujvxq() {
				this.$store
					.dispatch('jiaoyujvxq', {
						company_id: this.company_id,
						type: "class_ring"
					})
					.then(res => {
						console.log(res)
						this.school_list = res.data.data.school_list
						this.now_time = res.data.data.now_time

					});
			}

		},
		onLoad(data) {
			this.company_id = data.company_id
			this.jiaoyujvxq()
		}
	}
</script>

<style lang="less">
	.active {
		width: 100%;
		height: 280rpx;
		background-size: 100% 100%;
		font-size: 34rpx;
		color: #fff;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		.paihang {
			font-size: 40rpx;
			font-weight: bold;
			margin-top: 12rpx;
			letter-spacing: 0.25em;
		}
	}

	.centent {
		width: 100%;
		height: 140rpx;
		border-bottom: 2rpx solid #ccc;
		display: flex;
		margin-left: 20rpx;

		.one {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 60rpx;
			height: 100%;

			text {
				font-size: 28rpx;
				font-weight: bold;
				color: #0a98f7;
			}

			image {
				width: 60rpx;
				height: 60rpx;
			}
		}

		.two {
			width: 100rpx;
			height: 100%;
			// background-color: pink;
			display: flex;
			justify-content: center;
			align-items: center;

			image {
				width: 85rpx;
				height: 85rpx;
				border-radius: 50%;
			}
		}

		.three {
			width: calc(100% - 160rpx);
			height: 100%;
			// background-color: blue;
			font-size: 32rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			margin-left: 70rpx;
			// text-align: center;

			.fubudianzan {
				margin-top: 8rpx;
				// margin-left: 20rpx;
				font-size: 28rpx;
				color: #ccc;
				letter-spacing: 0.2em;
				text{
					margin-right: 30rpx;
				}
			}
		}
	}

	::-webkit-scrollbar {
		width: 0px;
		height: 0px;
		color: transparent;
	}
</style>
